
/*
import dao.AlunoDao;
import dao.EnderecoDao;
import dao.EstadoDao;
import entidades.Pessoa;
import entidades.Endereco;
import entidades.Estado;
import infra.CriadorDeSession;
import infra.CriadorDeSessionFactory;

/*
 *  Copyright void Team (C) 2010 Pedro Batista
 * 
 *  http://code.google.com/p/capacitec
 * 
 *  This file is part of capacitec.
 * 
 *  capacitec is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 * 
 *  capacitec is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with capacitec.  If not, see <http://www.gnu.org/licenses/>.
 */

/**
 *
 * @author Pedro
 *
public class AdicionaAluno {

	AlunoDao alunoDao;
	EstadoDao estadoDao;
	EnderecoDao enderecoDao;

	public AdicionaAluno(AlunoDao alunoDao, EstadoDao estadoDao, EnderecoDao enderecoDao) {
		this.alunoDao = alunoDao;
		this.estadoDao = estadoDao;
		this.enderecoDao = enderecoDao;
	}

	public static void main(String[] args) {
		CriadorDeSessionFactory factory = new CriadorDeSessionFactory();
		factory.abre();
		CriadorDeSession session = new CriadorDeSession(factory.getInstance());
		session.abre();

		AdicionaAluno add = new AdicionaAluno(
			new AlunoDao(session.getInstance(), new EnderecoDao(session.getInstance())),
			new EstadoDao(session.getInstance()),
			new EnderecoDao(session.getInstance()));

		/*
		Estado es = new Estado();
		es.setNome("Amapá");
		es.setNomeAbreviado("Aa");
		add.estadoDao.salva(es);
		 *

		Endereco e = new Endereco();
		e.setLogradouro("Rua dos Mundurucus");
		e.setNumero(3854);
		e.setBairro("Guama");
		e.setCep("66063-495");
		e.setCidade("Belém");

		e.setEstado(new Estado());
		e.getEstado().setNomeAbreviado("PA");

		Pessoa a = new Pessoa(e, "Pedro", "Batista");
		add.alunoDao.salva(a);

		session.fecha();
		factory.fecha();
	}

}
*/